<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        省份 <select v-model="cityId">
            <option value="">请选择省份</option>
            <option v-for="item in list" :value="item.list">{{item.cityname}}</option>
        </select>
        城市<select v-model="townId">
            <option value="">请选择城市</option>
            <option v-for="item in cityId" :value="item.list">{{item.cityname}}</option>
        </select>
        区县<select>
            <option value="">请选择区县</option>
            <option v-for="item in townId" :value="item.id">{{item.cityname}}</option>
        </select>
    </div>
</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {

            cityId: "",
            townId: "",

            list: [
                {
                    id: 1, cityname: "湖北", list: [{
                        id: 11, cityname: "武汉", list: [{
                            id: 111, cityname: "江夏"
                        }, {
                            id: 112, cityname: "洪山"
                        }]
                    }, {
                        id: 12, cityname: "荆州", list: [{
                            id: 121, cityname: "沙市"
                        }, {
                            id: 122, cityname: "松滋"
                        }]
                    }]
                },
                {
                    id: 2, cityname: "河南", list: [{
                        id: 21, cityname: "郑州", list: [{
                            id: 211, cityname: "新郑"
                        }, {
                            id: 212, cityname: "金水"
                        }]
                    }, {
                        id: 22, cityname: "洛阳", list: [{
                            id: 221, cityname: "洛阳的区一"
                        }, {
                            id: 222, cityname: "洛阳的区二"
                        }]
                    }]
                }],


        },
        methods: {
        },
        watch: {
            cityId() {
                this.townId = "";
            }
        }
    })

</script>

</html>